package com.liao.order.feign;

import com.liao.common.entity.member.UserAddressEntity;
import com.liao.common.utils.Result;
import com.liao.common.vo.member.CartDetailVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


/**
 * @Author: ljt
 * @Description: 用户微服务相关接口
 * @DateTime: 2025/3/14 上午10:25
 **/
@FeignClient(value = "youyoumall-member")
public interface MemberFeignService {

    /**
     * 获取购物车信息
     *
     * @return
     */
    @GetMapping("member/cart/getCart")
    Result<List<CartDetailVo>> getCart();

    /**
     * 获取地址信息
     */
    @RequestMapping("member/useraddress/addressList")
    Result<List<UserAddressEntity>> addressList();


    /**
     * 根据地址id获取地址信息
     */
    @RequestMapping("member/useraddress/info/{addressId}")
    Result<UserAddressEntity> addressInfo(@PathVariable("addressId") Integer addressId);
}
